/**
 * 
 */
package com.androidclient;

import android.app.Service;
import android.content.Intent;
import android.os.IBinder;
import android.widget.Toast;

/**
 * @author Hrafnkell
 * 
 */
public class TransmissionService extends Service {

	TransmitDataBroadcastReciever alarm = new TransmitDataBroadcastReciever();

	/*
	 * 
	 */
	@Override
	public void onCreate() {}

	@Override
	public int onStartCommand(Intent intent, int flags, int startId) {
		
		alarm.SetAlarm(getBaseContext());
		
		Toast.makeText(this, "TrackerTransmission started", Toast.LENGTH_SHORT)
		.show();
		return Service.START_NOT_STICKY;
	}

	@Override
	public void onDestroy() {
		alarm.CancelAlarm(getBaseContext());

		Toast.makeText(this, "TrackerTransmission stopped", Toast.LENGTH_SHORT)
				.show();
	}

	@Override
	public IBinder onBind(Intent arg0) {
		return null;
	}

}
